<template>
	<div>
		<el-input v-model="str">
			<template v-slot:append>
				<el-button type="primary" @click="decode">解码</el-button>
			</template>
		</el-input>
		<div>{{result}}</div>
	</div>
</template>

<script>
	import {
		ref
	} from 'vue'
	export default {
		name: 'DecodeTool',
		setup() {
			const str = ref('')
			const result = ref('')
			let decode = () => {
				const s = str.value.replaceAll('\\x', '%')
				console.log(s)
				result.value = decodeURIComponent(s)
			}
			return {
				str,
				result,
				decode
			}
		}
	}
</script>

<style>
</style>
